package cn.kgc.maoqichao.microservicecloudproviderdept8001.service;

import cn.kgc.maoqichao.microservicecloudproviderdept8001.mapper.ProjectMapper;
import cn.kgc.maoqichao.microservicecloudproviderdept8001.pojo.Project;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ProjectServiceImpI implements ProjectService{
    @Resource
    ProjectMapper projectMapper;

    @Override
    public List<Project> getAll() {
        return projectMapper.selectByExample(null);
    }

    @Override
    public Project getById(Integer id) {
        return projectMapper.selectByPrimaryKey(id);
    }

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return projectMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(Project project) {
        return projectMapper.insert(project);
    }

    @Override
    public int updateByPrimaryKey(Project project) {
        return projectMapper.updateByPrimaryKey(project);
    }
}
